Raspberry Pi Server Essentials by Raspberry Pi Server Essentials

Raspberry Pi Server Essentials by Raspberry Pi Server Essentials

Author:Raspberry Pi Server Essentials
Language: eng
Format: epub
Publisher: Packt Publishing


We need to update the nginx virtual host's configuration file now to tell nginx how to handle PHP requests. This time, you need to restart nginx after you save the file.

server { listen 80; root /var/www/local/web; index index.php index.html index.htm; location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } }

Create a new file named info.php in /var/www /local/web/ and add these simple lines to it:

<?php phpinfo(); ?>

Save the file and navigate to it in your browser.

You should see something similar to the preceding screenshot. This means that PHP is configured and you can use any PHP web application or write your own PHP scripts now.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.